package com.example.zkweixiu.app;

import android.app.Application;
import android.app.Service;
import android.os.Vibrator;

import androidx.multidex.MultiDex;

import com.baidu.mapapi.CoordType;
import com.baidu.mapapi.SDKInitializer;
import com.vondear.rxtool.RxTool;
import com.zhy.http.okhttp.OkHttpUtils;

import org.litepal.LitePal;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;

/**
 * Created by TT86 on 2018/1/23.
 */

public class MyApplication extends Application {
    public Vibrator mVibrator;
   // private static DisplayImageOptions options;
    @Override
    public void onCreate() {
        super.onCreate();

        MultiDex.install(this);
        LitePal.initialize(this);

        OkHttpClient okHttpClient = new OkHttpClient.Builder()
//                .addInterceptor(new LoggerInterceptor("TAG"))
                .retryOnConnectionFailure(true)

                .connectTimeout(30, TimeUnit.SECONDS)
                .readTimeout(10000L, TimeUnit.MILLISECONDS)
                //其他配置
                .build();

        OkHttpUtils.initClient(okHttpClient);

        RxTool.init(this);
        mVibrator =(Vibrator)getApplicationContext().getSystemService(Service.VIBRATOR_SERVICE);
        SDKInitializer.initialize(getApplicationContext());
        SDKInitializer.setCoordType(CoordType.BD09LL);
      //  RxTool.init(this);
    }






}



